<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@page import="it.milanoeasy.utils.Utils"%>
<%@page import="it.milanoeasy.jdoBeans.ClientBean"%>
<!DOCTYPE html>
<html>
  <head>
    <meta name="viewport" content="initial-scale=1.0, user-scalable=yes" />   
    <link rel="stylesheet" href="css/style.css" type="text/css"/>
    <title>Milano Easy Parking - 2013  Semplifica il tuo parcheggio a Milano, anche su Android</title>
    <script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
  ga('create', 'UA-41279296-1', 'milanoeasy.appspot.com');
  ga('send', 'pageview');
	</script>
	 <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDD4NKLbi8-KPxVSgJNUlekKtjG7b1mVws&sensor=true"></script>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.0/jquery.min.js"></script>    				
    <script type="text/javascript" src="script/geoxml3.js"></script>   
    <script src="script/edicole.js"></script>    
  </head>
  <body>
  <%
  	String param=(String)session.getAttribute("mobileapp");
	if (param!=null && param.equalsIgnoreCase("true") ||Utils.isMobileUA(request.getHeader("User-Agent"))) {		
	 %>
  <jsp:include page="top_mobile.jsp" />  
	<% } else { %>
	<jsp:include page="top.jsp" />
	<% } %>
	
   <!--  <div id="useragent"></div>  -->
   <div id="loading"></div>    
   <!--  <div id="messaggi"></div>
   <div id="toolbar"></div>
    -->
   <div id="map-canvas"></div>    
   <%     	
		try{
	     	ClientBean cb=(ClientBean)request.getAttribute("client");
			if (cb!=null && cb.getLatitudine()!=null && cb.getLongitudine()!=null){
				if ((cb.getLatitudine()+cb.getLongitudine())>0){
					out.write("<script type=\"text/javascript\">");
					out.write("initCarMarker("+cb.getLatitudine()+","+cb.getLongitudine()+",'"+Utils.dateFormat(cb.getDataora())+"');");
					out.write("</script>");
				} else {
					out.write("<script type=\"text/javascript\">");
					out.write("centerMap();");
					out.write("</script>");
				}
			}
		} catch(Exception e){
			e.printStackTrace();
		}
     %>
  </body>
</html>


